import request from "@/request/request.js";

// 获取出库列表
export const getOutboundList = (data) => {
  return request.get(`/admin-api/inventory/outbound-apply/page?${data}`);
};

// 出库详情
export const getOutboundDetails = (data) => {
  return request.get(`/admin-api/inventory/outbound-apply/get?${data}`);
};

// 出库详情列表信息
export const getOutboundDetailsList = (data) => {
  return request.get(
    `/admin-api/inventory/outbound-apply/get-bill-list-by-id?${data}`
  );
};

// 获取批次
export const getBillBatch = (data) => {
  return request.get(
    `/admin-api/inventory/outbound-apply/get-bill-batch-by-id?${data}`
  );
};

// 确认受理
export const confirmOutboundApply = (data) => {
  return request.get(`/admin-api/inventory/outbound-apply/receive?${data}`);
};

// 拒绝
export const rejectOutboundApply = (data) => {
  return request.get(`/admin-api/inventory/outbound-apply/reject?${data}`);
};

// 删除
export const deleteOutbound = (data) => {
  return request.del(`/admin-api/inventory/outbound-apply/delete?${data}`);
};

// 获取批次列表
// warehouseId=2&productId=75

export const getBatchList = (data) => {
  return request.get(
    `/admin-api/inventory/charge/get-batch-by-product?${data}`
  );
};

// 确认批次
export const appendBatch = (data) => {
  return request.post(`/admin-api/inventory/outbound-apply/append-batch`, data);
};

// 删除批次

export const deleteBatch = (data) => {
  return request.get(
    `/admin-api/inventory/outbound-apply/delete-batch?${data}`
  );
};

// 接收确认完成
export const confirmCheckReady = (data) => {
  return request.get(`/admin-api/inventory/outbound-apply/check-ready?${data}`);
};

// 获取出库批次库存列表

export const getOutboundBatchListNumber = (data) => {
  return request.post(`/admin-api/inventory/charge/get-page-by-batches`, data);
};

// 出库

export const checkOutbound = (data) => {
  return request.post(`/admin-api/inventory/outbound-apply/check-out`, data);
};
